<html>
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
  <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
  <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
  <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>

  <head>
    <title>
      GABLE
    </title>
    <script type="text/javascript" src="scripts/menu.js"></script>
    <link rel="stylesheet" type="text/css" href="css/main.css" />
  </head>

  <f:view>
    <body>
      <div id="lftBar">
        <f:subview id="menu_student" rendered="#{currentUser.loggedIn and not currentUser.teacher}">
          <jsp:include page="/common/menu_student.jsp"/>
        </f:subview>
        <f:subview id="menu_teacher" rendered="#{currentUser.loggedIn and currentUser.teacher}">
          <jsp:include page="/common/menu_teacher.jsp"/>
        </f:subview>
        <f:subview id="menu_common">
          <jsp:include page="/common/menu_common.jsp"/>
        </f:subview>
      </div>
      <div id="level0">
        <div id="level1">
          <div id="topBar">
            <f:subview id="header" rendered="#{not currentUser.loggedIn}">
              <jsp:include page="/common/header.jsp"/>
            </f:subview>
            <f:subview id="header_student" rendered="#{currentUser.loggedIn and not currentUser.teacher}">
              <jsp:include page="/common/header_student.jsp"/>
            </f:subview>
            <f:subview id="header_teacher" rendered="#{currentUser.loggedIn and currentUser.teacher}">
              <jsp:include page="/common/header_teacher.jsp"/>
            </f:subview>
          </div>
          <div id="contentBar">
            <center>
              <table style="border:none;height:75%;vertical-align:middle;">
                <tr>
                  <td>
                    <f:subview id="content" rendered="#{currentUser.loggedIn}">
                      <tiles:insertAttribute name="content" flush="false"/>
                    </f:subview>
                    <f:subview id="login_content" rendered="#{not currentUser.loggedIn}">
                      <jsp:include page="/login.jsp"/>
                    </f:subview>
                    <td>
                    </tr>
                  </table>
                </center>
              </div>
            </div>
          </div>
        </body>
      </f:view>
    </html>
